<?php
/**
 * Copyright (c) 2006-2008, Julien PORTALIER
 * http://featherphp.googlecode.com/
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 */

/**
 * Handles ActiveRecord Exceptions.
 */
class ActiveRecord_Exception extends Exception
{
	
}

/**
 * ...
 */
class ActiveRecord_Exception_RecordNotFound extends ActiveRecord_Exception
{
	function __construct()
	{
		parent::__construct(t('No such record.'), ActiveRecord::RecordNotFound);
	}
}

/**
 * ...
 */
class ActiveRecord_Exception_InvalidRecord extends ActiveRecord_Exception
{
	function __construct()
	{
		parent::__construct(t('Record is invalid.'), ActiveRecord::InvalidRecord);
	}
}

/**
 * ...
 */
class ActiveRecord_Exception_RecordNotSaved extends ActiveRecord_Exception
{
	function __construct()
	{
		parent::__construct(t('Record was not saved.'), ActiveRecord::RecordNotSaved);
	}
}
